package com.ash.jdk8;

import com.google.common.collect.Lists;

import java.util.List;

/**
 * @Author: Ashin
 * @Date: 2021/1/22
 * @Description: com.ashin.jdk8
 * @Version: 1.0.0
 */
public class Test {
    public static void main(String[] args) {
        User user = new User();
        user.setAge(12);
        user.setName("zjh");
        user.setPhone("110");
        List<User> list = Lists.newArrayList(user);
        list.forEach(u -> {
            u.getAge();
            u.getName();
        });

        list.forEach(User::getAge);
    }
}
